package com.bo.lock.reentrantReadWriteLock;

import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @Author: gpb
 * @Date: 2024/9/4 22:04
 * @Description:
 */
public class IReentrantReadWriteLock {

    private final static ReentrantReadWriteLock lock = new ReentrantReadWriteLock();

    static ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
    static ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
    public static void main(String[] args) throws InterruptedException {
        writeLock.lock();
        writeLock.unlock();
        readLock.lock();
    }
}
